import Vue from 'vue';
import Router from 'vue-router';
import HelloWorld from '@/components/HelloWorld';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('@/views/Home/index'),
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('@/views/User/Register'),
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('@/views/User/Login'),
    },
    {
      path: '/oauth/callback/',
      name: 'oauth',
      component: () => import('@/views/Oauth/CallBack'),
    },
    {
      path: '/user/center/',
      name: 'user_center',
      component: () => import('@/views/User/UserCenter'),
    },
    {
      path: '/user/center/site',
      name: 'user_center_site',
      component: () => import('@/views/User/UserCenterSite'),
    },
    {
      path: '/goods/list/',
      name: 'goods_list',
      component: () => import('@/views/Goods/GoodsList'),
    },
    {
      path: '/goods/detail/',
      name: 'goods_detail',
      component: () => import('@/views/Goods/GoodsDetail'),
    },
    {
      path: '/carts/',
      name: 'carts',
      component: () => import('@/views/Carts/Carts'),
    },
    {
      path: '/place_order/',
      name: 'place_order',
      component: () => import('@/views/Orders/PlaceOrder'),
    },
    {
      path: '/order_success/',
      name: 'place_order',
      component: () => import('@/views/Orders/OrderSuccess'),
    },
    {
      path: '/user/center/order/',
      name: 'center_order',
      component: () => import('@/views/User/UserCenterOrder'),
    },
    {
      path: '/payment/status/',
      name: 'payment_status',
      component: () => import('@/views/Payment/PaymentCallBack'),
    },
    {
      path: '/order/judge/',
      name: 'order_judge',
      component: () => import('@/views/Orders/OrderJudge'),
    },
  ],
  mode: 'history' /*hash,history*/
});
